package com.org.litepal.slice.manager;

import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import org.litepal.harmony.ResourceTable;

/**
 * 管理
 */
public class ManagerAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_manager);

        //当前模型结构
        Button btnModel = (Button) findComponentById(ResourceTable.Id_btnManager_model);
        //当前表结构
        Button btnTable = (Button) findComponentById(ResourceTable.Id_btnManager_table);

        btnModel.setClickedListener(component -> present(new ModelListAbilitySlice(), new Intent()));
        btnTable.setClickedListener(component -> present(new TableListAbilitySlice(), new Intent()));
    }
}